﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.Collections.ObjectModel;

namespace SGT.Model
{
    public class Deposito : INotifyPropertyChanged
    {
        private int _DepositoID;
        private string _Nombre;
        private string _Direccion;
        private ObservableCollection<Sector> _Sectores;

        public Deposito()
        {
        }

        public int DepositoID
        {
            get { return _DepositoID; }
            set
            {
                _DepositoID = value;
                RaisePropertyChanged("DepositoID");
            }
        }

        public string Nombre
        {
            get { return _Nombre; }
            set
            {
                _Nombre = value;
                RaisePropertyChanged("Nombre");
            }
        }

        public string Direccion
        {
            get { return _Direccion; }
            set
            {
                _Direccion = value;
                RaisePropertyChanged("Direccion");
            }
        }

        public ObservableCollection<Sector> ColeccionSectores
        {
            get { return _Sectores; }
            set
            {
                _Sectores = value;
                RaisePropertyChanged("ColeccionSectores");
            }
        }


        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        private void RaisePropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(
                    this,
                    new PropertyChangedEventArgs(propertyName)
                    );
            }
        }

        #endregion
    }
}
